package com.zhn.evsi.client;

import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Request;
import com.dtflys.forest.annotation.Retry;
import com.dtflys.forest.annotation.Var;
import com.zhn.evsi.domain.dto.evsi.common.EvsiIconDTO;
import com.zhn.evsi.domain.dto.evsi.corporation.EvsiCorporationPublicInfoDTO;
import com.zhn.evsi.interceptor.TokenExceptionInterceptor;
import org.springframework.stereotype.Component;

@Component
@BaseRequest(baseURL = "${eveData}${eveDataSns}", interceptor = TokenExceptionInterceptor.class)
@Retry(maxRetryCount = "3", maxRetryInterval = "1000")
public interface CorporationClient {

    /**
     *
     * */
    // https://esi.evetech.net/latest/corporations/98539082/?datasource=tranquility
    @Request(
            url = "/corporations/{corporations}/?datasource=tranquility",
            type = "GET"
    )
    EvsiCorporationPublicInfoDTO corporations(@Var("corporations") Integer corporations);


    // https://esi.evetech.net/latest/corporations/98539082/icons/?datasource=tranquility
    @Request(
            url = "/corporations/{corporations}/icons/?datasource=tranquility",
            type = "GET"
    )
    EvsiIconDTO corporationIcon(@Var("corporations") Integer corporations);
}
